﻿<?php
abstract class ActionController {

    protected $params;
    protected $view;
    protected $user;
    
    public function __construct($params, $view, $user) {
    
        $this->params = $params;
        $this->view = $view;
        $this->user = $user;
    }
    
    abstract function run();
    
    public function redirect($controller) {
        header('Location: index.php?controller=' . $controller);
    }
    
    public function isPost() {
        if($_POST) return true;
        else return false;
    }
    
    public function getPost() {
        return $_POST;
    }
}
?>